package com.frcdi.qms.measurement.domain;

import com.frcdi.qms.common.annotation.Excel;
import com.frcdi.qms.common.core.domain.BaseEntity;
import com.frcdi.qms.equipment.domain.EquipmentBase;
import io.swagger.annotations.ApiModel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 一般性测量数据采集记录对象 bus_measurement_record
 *
 * @author cell
 * @date 2024-02-27
 */
@ApiModel(value = "一般性测量数据采集记录对象")
public class MeasurementRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录id */
    private Long recordId;

    /** 一般性测量数据id */
    @Excel(name = "一般性测量数据id")
    private Long measurement;

    /** 测量数据次数（个数） */
    @Excel(name = "测量数据次数", readConverterExp = "个数")
    private Integer measurementNumber;

    /** 数据次数 */
    @Excel(name = "数据次数")
    private Integer dataNumber;

    /** 是否超出范围 */
    @Excel(name = "是否超出范围")
    private String isRange;

    /** 采集数据 */
    @Excel(name = "采集数据")
    private BigDecimal recordData;

    /** 数据来源 */
    @Excel(name = "数据来源")
    private String dataSource;

    /** 历史标志（0代表存在 2为历史数据） */
    @Excel(name = "历史标志", readConverterExp = "0=代表存在,2=为历史数据")
    private String historyFlag;

    private String reason;

    /** 单位 */
    @Excel(name = "单位")
    private String unitName;

    private EquipmentBase equipmentEntity;

    public EquipmentBase getEquipmentEntity() {
        return equipmentEntity;
    }

    public void setEquipmentEntity(EquipmentBase equipmentEntity) {
        this.equipmentEntity = equipmentEntity;
    }

    public void setRecordId(Long recordId)
    {
        this.recordId = recordId;
    }

    public Long getRecordId()
    {
        return recordId;
    }
    public void setMeasurement(Long measurement)
    {
        this.measurement = measurement;
    }

    public Long getMeasurement()
    {
        return measurement;
    }
    public void setMeasurementNumber(Integer measurementNumber)
    {
        this.measurementNumber = measurementNumber;
    }

    public Integer getMeasurementNumber()
    {
        return measurementNumber;
    }
    public void setDataNumber(Integer dataNumber)
    {
        this.dataNumber = dataNumber;
    }

    public Integer getDataNumber()
    {
        return dataNumber;
    }
    public void setIsRange(String isRange)
    {
        this.isRange = isRange;
    }

    public String getIsRange()
    {
        return isRange;
    }
    public void setRecordData(BigDecimal recordData)
    {
        this.recordData = recordData;
    }

    public BigDecimal getRecordData()
    {
        return recordData;
    }
    public void setDataSource(String dataSource)
    {
        this.dataSource = dataSource;
    }

    public String getDataSource()
    {
        return dataSource;
    }
    public void setHistoryFlag(String historyFlag)
    {
        this.historyFlag = historyFlag;
    }

    public String getHistoryFlag()
    {
        return historyFlag;
    }
    public void setUnitName(String unitName)
    {
        this.unitName = unitName;
    }

    public String getUnitName()
    {
        return unitName;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("measurement", getMeasurement())
            .append("measurementNumber", getMeasurementNumber())
            .append("dataNumber", getDataNumber())
            .append("isRange", getIsRange())
            .append("recordData", getRecordData())
            .append("dataSource", getDataSource())
            .append("historyFlag", getHistoryFlag())
            .append("unitName", getUnitName())
            .append("remark", getRemark())
            .append("reason", getReason())
            .toString();
    }
}
